/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package DomainModel;

import java.util.Date;

/**
 *
 * @author Alex
 */
public class ResetPassword {

    private Integer id;
    private Integer userId;
    private String token;
    private Date expireDate;

    public ResetPassword(Integer id, Integer userId, String token, Date expireDate) {
        this.id = id;
        this.userId = userId;
        this.token = token;
        this.expireDate = expireDate;
    }

    public ResetPassword(Integer id) {
        this.id = id;
    }

    public boolean isExpired() {
        Date currentDate = new Date();
        boolean expired = this.expireDate.after(currentDate);
        return expired;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public Date getExpireDate() {
        return expireDate;
    }

    public void setExpireDate(Date expireDate) {
        this.expireDate = expireDate;
    }

}
